/*
 * label.h
 *
 *  Created on: Nov 25, 2020
 *      Author: ZKSWE Develop Team
 */

#ifndef _WIDGET_LABEL_H_
#define _WIDGET_LABEL_H_

#include "widget.h"

#define TEXT_ALIGN_HCENTER       0x00
#define TEXT_ALIGN_LEFT          0x01
#define TEXT_ALIGN_RIGHT         0x02
#define TEXT_ALIGN_HMASK         0x03

#define TEXT_ALIGN_VCENTER	     0x00
#define TEXT_ALIGN_TOP           0x10
#define TEXT_ALIGN_BOTTOM        0x20
#define TEXT_ALIGN_VMASK         0x30

typedef struct {
	WIDGET_COMMON;

	uint16_t text_color;
	uint8_t align;
	uint8_t fontsize;
} label_t;

int label_proc(widget_t *widget, const msg_t *m);

#endif /* _WIDGET_LABEL_H_ */
